<HTML
><HEAD
><TITLE
>GR_EVENT_BUTTON</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"><LINK
REL="HOME"
TITLE="Nano-X Library API"
HREF="index.html"><LINK
REL="UP"
TITLE="Nano-X Data Types"
HREF="nxstruct.html"><LINK
REL="PREVIOUS"
TITLE="GR_EVENT"
HREF="nxstruct_GR_EVENT.html"><LINK
REL="NEXT"
TITLE="GR_EVENT_ERROR"
HREF="nxstruct_GR_EVENT_ERROR.html"></HEAD
><BODY
CLASS="REFENTRY"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Nano-X Library API</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="nxstruct_GR_EVENT.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="nxstruct_GR_EVENT_ERROR.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="NXSTRUCT.GR.EVENT.BUTTON"
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT_BUTTON</SPAN
></A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN9047"
></A
><H2
>Name</H2
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT_BUTTON</SPAN
>&nbsp;--&nbsp;Mouse button event structure</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN9051"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>typedef struct 
{
    GR_EVENT_TYPE   type;
    GR_WINDOW_ID    wid;
    GR_WINDOW_ID    subwid;
    GR_COORD        rootx;
    GR_COORD        rooty;
    GR_COORD        x;
    GR_COORD        y;
    GR_BUTTON       buttons;
    GR_BUTTON       changebuttons;
    GR_KEYMOD       modifiers;
    GR_TIMEOUT      time;
} GR_EVENT_BUTTON;
  </PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9053"
></A
><H2
>Description</H2
><P
>    The <SPAN
CLASS="STRUCTNAME"
>GR_EVENT_BUTTON</SPAN
> structure is used by
    nano-X to report changes in the status of the mouse buttons. When
    a mouse button state changes only one mouse button event is sent to
    a client. The event is sent to the highest window that
    has selected for the event. If the window's parent has also
    selected for button events, nano-X will not send an additional
    event for the parent window.    
    </P
><P
>    If a window has selected both
    <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_DOWN</TT
> and
    <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_UP</TT
> events, nano-X will
    grab the mouse for that window when a mouse button is first
    pressed down. While the mouse is grabbed, no mouse button or
    position events will be delivered to any window besides the window
    that nano-X grabbed the mouse for. The mouse will remain grabbed
    until all of the mouse buttons are released.
    </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9060"
></A
><H2
>Fields</H2
><DIV
CLASS="INFORMALTABLE"
><A
NAME="AEN9062"
></A
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>Type</TH
><TH
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>Name</TH
><TH
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_EVENT_TYPE.html"
>        <SPAN
CLASS="TYPE"
>GR_EVENT_TYPE</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>type</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The event type will be either a 
        <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_DOWN</TT
> or a
        <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_UP</TT
> type.</TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_WINDOW_ID.html"
>        <SPAN
CLASS="TYPE"
>GR_WINDOW_ID</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>wid</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The ID of the window that the mouse button event
        is being sent to. If the mouse has been grabbed then this is
        the window that nano-X grabbed the mouse for. In this case the
        mouse may not actually be positioned over the window any
        longer. The mouse may be over a child window or it may be
        outside the window that grabbed the mouse. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_WINDOW_ID.html"
>        <SPAN
CLASS="TYPE"
>GR_WINDOW_ID</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>subwid</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The ID of the window that the mouse button event occurs
        in. Generally this field will be the same as
        <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>, but in some cases if the mouse
        event occurs in a decendant of <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>,
        then this field indicates that child window. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>rootx</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The X coordinate of the mouse pointer relative to the
        root window. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>rooty</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The Y coordinate of the mouse pointer relative to the
        root window. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>x</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The X coordinate of the mouse pointer relative to the
        window <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_COORD.html"
>        <SPAN
CLASS="TYPE"
>GR_COORD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>y</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>The Y coordinate of the mouse pointer relative to the
        window <TT
CLASS="STRUCTFIELD"
><I
>wid</I
></TT
>. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_BUTTON.html"
>        <SPAN
CLASS="TYPE"
>GR_BUTTON</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>buttons</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Indicates the buttons that are being pressed.</TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_BUTTON.html"
>        <SPAN
CLASS="TYPE"
>GR_BUTTON</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>changebuttons</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Indicates the buttons that have just changed state. If
        the event type is
        <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_DOWN</TT
>, then this
        field indicates the button(s) that were just pressed. If the
        event type is <TT
CLASS="CONSTANT"
>GR_EVENT_TYPE_BUTTON_UP</TT
>,
        then this field indicates the button(s) that were just
        released. </TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_KEYMOD.html"
>        <SPAN
CLASS="TYPE"
>GR_KEYMOD</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>modifiers</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Indicates the status of the keyboard modifier
        keys.</TD
></TR
><TR
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
><A
HREF="nxstruct_GR_TIMEOUT.html"
>        <SPAN
CLASS="TYPE"
>GR_TIMEOUT</SPAN
></A
></TD
><TD
WIDTH="25%"
ALIGN="LEFT"
VALIGN="TOP"
>time</TD
><TD
WIDTH="50%"
ALIGN="LEFT"
VALIGN="TOP"
>Time stamp of when the button event occured in milliseconds.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN9147"
></A
><H2
>See Also</H2
><P
>      <A
HREF="nxstruct_GR_EVENT.html"
>            <SPAN
CLASS="STRUCTNAME"
>GR_EVENT</SPAN
></A
>, 
      <A
HREF="nxstruct_GR_EVENT_MOUSE.html"
>            <SPAN
CLASS="STRUCTNAME"
>GR_EVENT_MOUSE</SPAN
></A
>, 
      <A
HREF="nxstruct_GR_EVENT_KEYSTROKE.html"
>            <SPAN
CLASS="STRUCTNAME"
>GR_EVENT_KEYSTROKE</SPAN
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="nxstruct_GR_EVENT.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="nxstruct_GR_EVENT_ERROR.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT</SPAN
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="nxstruct.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><SPAN
CLASS="STRUCTNAME"
>GR_EVENT_ERROR</SPAN
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>